﻿<UserControl x:Class="SomethingSpacialSpeakerNotifier.SpeakerNotifier"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="540" d:DesignWidth="786" 
    xmlns:controlsDataToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Toolkit" 
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
    xmlns:converters="clr-namespace:SomethingSpacialSpeakerNotifier.Converters"         
             >
    

    <UserControl.Resources>
        
        <converters:TimeConverter  x:Key="TimeConverter" />
        <converters:RounderConverter  x:Key="RounderConverter" />
        

    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="#FF333333">
    	<Grid.RowDefinitions>
    		<RowDefinition Height="65"/>
    		<RowDefinition/>
    		<RowDefinition Height="120"/>
    		<RowDefinition Height="40"/>
    	</Grid.RowDefinitions>
        <StackPanel Margin="10,0,10,15" Orientation="Vertical" Grid.Row="2" VerticalAlignment="Bottom">
    		<TextBlock TextWrapping="Wrap" Text="Selected Feedback" FontWeight="Bold" Foreground="White"/>
    		<Border Height="81" BorderBrush="#FF88CCE4" BorderThickness="1">
    			<TextBlock x:Name="tbFeedback" Foreground="White" TextWrapping="Wrap" Text=""/>
    		</Border>
    	</StackPanel>
        <data:DataGrid x:Name="SessionFeedbacks"
        	AutoGenerateColumns="False" 
        	SelectionMode="Single" 
        	HorizontalContentAlignment="Left" 
        	ScrollViewer.VerticalScrollBarVisibility="Auto" 
        	Margin="10,5" 
        	IsReadOnly="True"  
        	SelectionChanged="SessionFeedbacks_SelectionChanged"
                               d:LayoutOverrides="Height" Grid.Row="1"
                               >
        	<data:DataGrid.Columns>
        		<data:DataGridTextColumn Header="Id" 
        			Binding="{Binding EFB_ID, Mode=OneWay}" 
        			CanUserSort="True" 
        			CellStyle="{x:Null}" 
        			CanUserResize="True" 
        			ClipboardContentBinding="{x:Null}" 
        			IsReadOnly="True" MaxWidth="Infinity" MinWidth="0" Visibility="Visible" Width="Auto"/>
        		<data:DataGridTextColumn Header="Time" 
        			CanUserSort="True"
        			Binding="{Binding EFB_DateTime, Converter={StaticResource TimeConverter}, Mode=OneWay}" 
        			IsReadOnly="True" 
        			Width="Auto"                     
                            />
        		<data:DataGridTextColumn Header="Type" 
        			CanUserSort="True"
        			Binding="{Binding EFB_FeedbackType, Mode=OneWay}" 
        			IsReadOnly="True" 
        			Width="Auto"                     
                            />
        		<data:DataGridTextColumn Header="User" 
        			CanUserSort="True"
        			Width="120"              
        			Binding="{Binding EFB_UserID, Mode=OneWay}" 
        			IsReadOnly="True" 
                            />
        		<data:DataGridTextColumn Header="Feedback" 
        			Binding="{Binding EFB_FeedbackContent, Mode=OneWay}" 
        			CanUserSort="True" 
        			CanUserResize="True" 
        			IsReadOnly="False" 
        			Visibility="Visible" 
        			Width="360" />
        	</data:DataGrid.Columns>
        </data:DataGrid>
    	<TextBlock Foreground="White" Text="Speaker Notifier Tool"  HorizontalAlignment="Center" FontSize="20" Margin="10,10,10,25" d:LayoutOverrides="Height" />
    	<TextBlock x:Name="WarningText" 
    		Text="Here can be seen the latest Questions and Comments" TextWrapping="Wrap" TextAlignment="Center" FontSize="14" Foreground="#FFFDEBEB" HorizontalAlignment="Center" Margin="0,0,0,-1" VerticalAlignment="Bottom" />
    	<Grid x:Name="footer" Margin="0" Grid.Row="4">
    		<Grid.ColumnDefinitions>
    			<ColumnDefinition Width="0.47*"/>
    			<ColumnDefinition Width="0.53*"/>
    		</Grid.ColumnDefinitions>
    		<StackPanel x:Name="sp_gettingFeedbacksInSeconds" Grid.ColumnSpan="1" Grid.Column="1" Margin="0,0,5,1" Orientation="Horizontal" d:LayoutOverrides="Width" HorizontalAlignment="Right">
    			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Getting new Feedbacks in" VerticalAlignment="Center" Foreground="White" FontSize="14.667"/>
    			<TextBlock x:Name="tbGrabbingFeedsIn"  TextWrapping="Wrap" Text="99" Foreground="#FFFDFDFD" HorizontalAlignment="Center" FontSize="26.667" Margin="0,0,0,1" VerticalAlignment="Center"/>
    			<TextBlock Foreground="White" FontSize="14.667" HorizontalAlignment="Left" TextWrapping="Wrap" Text="seconds" Margin="0" Width="59" VerticalAlignment="Center"/>
    		</StackPanel>
    		<StackPanel Margin="0" Orientation="Horizontal" HorizontalAlignment="Left">
    			<TextBlock TextWrapping="Wrap" Text="Select Seconds to update:" Foreground="#FFF7F7F7" VerticalAlignment="Center" Margin="5,0"/>
    			<Slider x:Name="slider" 
                        MinWidth="60" 
                        Margin="5,0" 
                        Width="70" 
                        Minimum="1" Maximum="99" 
                        SmallChange="10" LargeChange="10" 
                        Cursor="Hand" Value="10" 
                         ValueChanged="slider_ValueChanged"
                        />
    			<TextBlock x:Name="tbSeconds" Foreground="#FFF7F7F7" TextWrapping="Wrap" Text="{Binding Value, ElementName=slider, Converter={StaticResource RounderConverter} }" VerticalAlignment="Center" FontSize="16" Margin="5,0"/>
                
                
    		</StackPanel>
    	</Grid>
    	<Canvas x:Name="cSomething" Margin="10,10,203,134" Grid.RowSpan="2" Background="#FFE2DADA" Visibility="Collapsed"/>
    </Grid>
</UserControl>
        